import { get, post } from '../http'

const shop = {
  // 获取商品列表
  getShopList (query) {
    return get('/goods/searchGoods', query)
  },
  // 新增商品
  addShop (params) {
    return post('/goods/add', params)
  },
  // 删除商品
  deleteShop (params) {
    return post('/goods/delById', params)
  },
  // 修改商品
  discShop (params) {
    return post('/goods/update', params)
  },
  // 商品上下架
  controlShop (params) {
    return post('/goods/update', params)
  },
  // 查询商品推荐列表
  shopRecommend (query) {
    return get('/goodsRecommend/queryRecommendGoodsList', query)
  },
  // 添加商品推荐
  addRecommend (params) {
    return post('/goodsRecommend/add', params)
  },
  // 取消推荐
  delRecommend (params) {
    return post('/goodsRecommend/del', params)
  },
  // 查询未推荐商品
  shopCanRecommend (query) {
    return get('/goodsRecommend/queryNotRecommendGoodsList', query)
  },
  // 删除评论
  deleteComment (params) {
    return post('/goodsComment/del', params)
  },
  // 获取评论列表
  getCommentList (query) {
    return get('/goodsComment/queryAll', query)
  }
}

export default shop
